package com.zzy.util;

import java.awt.*;

/** 移动鼠标 */
public class MoveMouse {
    public static void main(String[] args) {
        try {

            int x;
            int y;
            Robot robot = new Robot();
            while (true){
                Thread.sleep(1000);
                Point p  = MouseInfo.getPointerInfo().getLocation();
                x = p.x + 10;
                y = p.y + 10;
                robot.mouseMove(x,y);
                Thread.sleep(2000);
            }

        }catch (Exception e){

        }
    }
}
